package com.example.content.fragment.me.coin

import androidx.recyclerview.widget.LinearLayoutManager
import com.example.content.ME_ADD_BANK_CARD_TYPE
import com.example.content.R
import com.example.content.databinding.FragmentSelectMyBankCardBinding
import com.example.content.fragment.BaseMvvmFragment
import com.example.content.manager.ActivityMgr
import com.example.content.viewmodule.me.MyPageCommonViewModel

class SelectBankCardFragment : BaseMvvmFragment<FragmentSelectMyBankCardBinding, MyPageCommonViewModel>() {


    override fun initView() {
        dataBinding.titleBar.title.text = getString(R.string.my_bank_card)

        dataBinding.recyclerView.layoutManager = LinearLayoutManager(context)
    }

    override fun initListener() {
        dataBinding.titleBar.backIcon.setOnClickListener {
            activity?.finish()
        }
        dataBinding.addBankCard.setOnClickListener {
            ActivityMgr.startFragment(ME_ADD_BANK_CARD_TYPE)
        }
    }

    override fun getViewModuleClass(): Class<MyPageCommonViewModel> {
        return MyPageCommonViewModel::class.java
    }

    override fun getLayoutId() = R.layout.fragment_select_my_bank_card

    companion object {
        @JvmStatic
        fun newInstance() = SelectBankCardFragment()
    }
}